import 'package:flame/components.dart';
import 'package:flutter_flame/worlds/game/entity/PlantEntity.dart';

import '../../../config/AssetsName.dart';
import '../components/seedChooserBank/SeedPacket.dart';
import '../model/SeedModel.dart';

class SeedSelectionState {
  int preAddSelectorIndex = 0;
  List<Vector2> seedBankPositions = []; // 待选菜单位置
  List<SeedPacket> selectedSeeds = []; // 选中的植物
  int maxSeedsLength = 6;
  List<SeedModel> seeds = [
    SeedModel(
      image: AssetsName.spriteSeedPeashooter,
      imageOffset: Vector2(-10, -20),
      costSunlight: 100,
      coldTime: 5,
      scaleImage: 2,
      plantEntity: PlantEntity.peashooter,
      dragShadowSize: Vector2(150, 150),
      dragShadowOffset: Vector2(-5, 140),
      lawnCellShadowCellOffset: Vector2(4, -15),
    ),
    SeedModel(
      image: AssetsName.spriteSeedSunFlower,
      imageOffset: Vector2(8, 15),
      costSunlight: 50,
      coldTime: 3,
      plantEntity: PlantEntity.sunflower,
      dragShadowOffset: Vector2(30, 200),
      lawnCellShadowCellOffset: Vector2(0, 0),
    ),
    SeedModel(
      image: AssetsName.spriteBloverIdle,
      imageOffset: Vector2(8, 18),
      costSunlight: 100,
      coldTime: 3,
      plantEntity: PlantEntity.blover,
    ),
    SeedModel(
      image: AssetsName.spriteCabbagepultIdle,
      imageOffset: Vector2(-1, -4),
      costSunlight: 100,
      coldTime: 3,
      scaleImage: 1.6,
      plantEntity: PlantEntity.cabbagepult,
      dragShadowSize: Vector2(150, 150),
      dragShadowOffset: Vector2(-17, 138),
      lawnCellShadowCellOffset: Vector2(0, 0),
    ),
    SeedModel(
      image: AssetsName.spriteCactusIdle,
      imageOffset: Vector2(-13, -28),
      costSunlight: 225,
      coldTime: 8,
      plantEntity: PlantEntity.cactus,
      scaleImage: 2.1,
      dragShadowSize: Vector2(180, 180),
      dragShadowOffset: Vector2(-20, 110),
      lawnCellShadowCellOffset: Vector2(5, -35),
    ),
    SeedModel(
      image: AssetsName.spriteCattailIdle,
      imageOffset: Vector2(6, 18),
      costSunlight: 225,
      coldTime: 8,
      plantEntity: PlantEntity.cattail,
    ),
    SeedModel(
      image: AssetsName.spriteCaltropIdle,
      imageOffset: Vector2(8, 28),
      costSunlight: 100,
      coldTime: 5,
      plantEntity: PlantEntity.caltrop,
    ),
    SeedModel(
      image: AssetsName.spriteCherryBombIdle,
      imageOffset: Vector2(8, 20),
      costSunlight: 150,
      coldTime: 6,
      plantEntity: PlantEntity.cherryBomb,
    ),
    SeedModel(
      image: AssetsName.spriteChomperIdle,
      imageOffset: Vector2(12, 15),
      costSunlight: 150,
      coldTime: 4,
      plantEntity: PlantEntity.chomper,
    ),
    SeedModel(
      image: AssetsName.spriteCobCannonIdle,
      imageOffset: Vector2(8, 30),
      costSunlight: 300,
      coldTime: 10,
      plantEntity: PlantEntity.cobCannon,
    ),
    SeedModel(
      image: AssetsName.spriteCoffeebeanIdle,
      imageOffset: Vector2(14, 18),
      costSunlight: 75,
      scaleImage: 0.7,
      coldTime: 5,
      plantEntity: PlantEntity.coffeeBean,
    ),
  ];
}
